<?php

namespace Home\Model;

use Think\Model;

class SuserModel extends Model
{
		/* 自动验证规则 */
	protected $_validate = array(
		array('name','1,10','用户名输入长度要1到10位',0,'length'),
		array('repwd','pwd','两次输入的密码不相同',0,'confirm'),
		array('email','email','邮箱输入格式不正确',0,regex),
		array('name','','用户名已存在',0,'unique'),
		array('email','','此邮箱已注册',0,'unique'),
		);

	protected $_auto = array(
		array('ctime','time',1,'function'),
		array('pwd','md5',3,'function'),
		);
}
